package com.example.safeassistan.home.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.example.safeassistan.R;
import com.example.safeassistan.base.BaseActivity;

public class HiddenDanger_Level_Select  extends BaseActivity implements View.OnClickListener {
    private TextView tvBig,tvCommon;


    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.tvBig:
                //重大
                Intent intent = new Intent();
                intent.putExtra("type","1");
                intent.putExtra("name","重大");
                setResult(RESULT_OK, intent);
                finish();
                break;
            case R.id.tvCommon:
                //一般
                Intent intent1 = new Intent();
                intent1.putExtra("type","3");
                intent1.putExtra("name","一般");
                setResult(RESULT_OK, intent1);
                finish();
                break;
        }
    }

    @Override
    protected void init(Bundle savedInstanceState) {
        setAndroidNativeLightStatusBar(true);
    }

    @Override
    protected int setLayoutResourceID() {
        return R.layout.hiddendanger_level_select;
    }

    @Override
    protected void initView() {
        setTitleText("风险等级选择");
        tvBig=findViewById(R.id.tvBig);
        tvBig.setOnClickListener(this::onClick);
        tvCommon=findViewById(R.id.tvCommon);
        tvCommon.setOnClickListener(this::onClick);
    }

    @Override
    protected void initData() {

    }

    @Override
    protected int getTitleBarType() {
        return 0;
    }
}
